// JavaScript Document
function viewPaper()
{
	with (window.document.frmListPaper) {
		if (cboCategory.selectedIndex == 0) {
			window.location.href = 'index.php';
		} else {
			window.location.href = 'index.php';
		}
	}
}

function checkAddPaperForm()
{
	with (window.document.frmAddPaper) {
		/*if (cboTopicGroup.selectedIndex == 0) {
			alert('Choose the Paper Group');
			cboTopicGroup.focus();
			return;
		} else*/ if (isEmpty(txtMabb, 'Nhập mã bài báo')) {
			return;
		} else {
			submit();
		}
	}
}

function addPaper()
{
	window.location.href = 'index.php?view=add';
}

function modifyPaper(id, nn_id)
{
	window.location.href = 'index.php?view=modify&id=' + id + '&nn_id=' + nn_id;
}

function deletePaper(matg, mannc)
{
	if (confirm('Xóa bài báo này?')) {
		window.location.href = 'processAuthor.php?action=deletePaper&matg=' + matg + '&mannc=' + mannc;
	}
}

function deleteImage(matg)
{
	if (confirm('Delete this image')) {
		window.location.href = 'processAuthor.php?action=deleteImage&matg=' + matg;
	}
}